<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #result{
            width: 100px;
            height: 50px;
            margin: 0 auto;
            box-shadow: 5px 5px 10px;
            text-align: center;
            line-height: 50px;
            font-size: 26px;
            background-color: #eee;
        }
    </style>
</head>
<body>
    <div id="result">
        0000
    </div>
    <script>
        var a=1,i=0;
        do{
            i += a;
            a++;
        }while(a<=100)
        document.getElementById("result").innerText = i;
    </script>
</body>
</html>